home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 2 / AACD 2.iso / AACD / Programming / jpeglibrary / autodocs / jpeg.autodoc
Encoding:
Text File  |  1999-03-06  |  21.2 KB  |  665 lines

  1. TABLE OF CONTENTS
  2.  
  3. jpeg.library/--background--
  4. jpeg.library/--future--
  5. jpeg.library/--history--
  6. jpeg.library/--information--
  7. jpeg.library/AllocBufferFromJPEGA
  8. jpeg.library/AllocJPEGCompressA
  9. jpeg.library/AllocJPEGDecompressA
  10. jpeg.library/CompressJPEGA
  11. jpeg.library/DecompressJPEGA
  12. jpeg.library/FreeJPEGBuffer
  13. jpeg.library/FreeJPEGCompress
  14. jpeg.library/FreeJPEGDecompress
  15. jpeg.library/GetJPEGInfoA
  16. jpeg.library/--background--                       jpeg.library/--background--
  17.  
  18.    PURPOSE
  19.  To allow de/compression of images into/from the jpeg image format.
  20.  
  21.    COPYRIGHT
  22.  The copyright in this library is owned by Paul Huxham.
  23.  This software is based in part on the work of the Independent JPEG Group.
  24.  The jpeg de/compression routines are copyright by the Independent
  25.  JPEG Group, written by Thomas G. Lane.
  26.  
  27.    DISCLAIMER
  28.  jpeg.library and its associated files are supposed to enable jpeg images
  29.  to be de/compressed. Even though every effort has been made to make
  30.  jpeg.library as stable and functional as possible, I cannot rule out the
  31.  possibility that jpeg.library may have bugs that have side effects
  32.  (possibly harmful) on your system.
  33.  
  34.  I hereby reject any liability or responsibility for these or any other
  35.  consequences from the use of jpeg.library whatsoever. This includes, but
  36.  is not limited to, damage to your equipment, to your data, personal
  37.  injuries, financial loss or any other kinds of side effects.
  38.  
  39.  jpeg.library is provided as-is. This means I do not guarantee that
  40.  jpeg.library is fit for any specific purpose and I do not guarantee any
  41.  bug fixes, updates or help during error recovery.
  42.  
  43.    DISTRIBUTION
  44.  jpeg.library should be distributed at no charge to the end user. It may
  45.  be included on Aminet CDs.
  46.  
  47.  The author retains all rights to the enclosed software. Payment is not
  48.  required for the use of jpeg.library.
  49.  
  50.    REQUIREMENTS
  51.  A minimum of Kickstart 2.0 and 68020 CPU is required to use jpeg.library.
  52.  
  53.    COMPLIER
  54.  jpeg.library was written and compiled using CED V3.5 and SAS/C 6.55 on
  55.  an Amiga 4000/060. CyberGuard was used to detect/correct programming
  56.  errors.
  57.  
  58.    BUGS
  59.  Should you find any bugs, please report them so that they can be fixed.
  60.  Likewise any suggestions for improvment of the library should be
  61.  forwarded so that they can be addressed.
  62.  
  63.    THANKYOUS
  64.  Many thanks to
  65.    Dinh Thi Kim Tuyen
  66.      -Who makes the sky blue and the world turn. I love you, forevermore.
  67.  
  68.    Steve Quartly
  69.      - For saying its possible and then helping me do it.
  70.  
  71.    Stephan Rupprecht
  72.      - For includes/jpeg_lib.h for different compilers.
  73.  
  74.    AUTHOR
  75.   You can contact the author via:
  76.     email: paulh@mafeking.scouts.org.au
  77.     www: http://mafeking.scouts.org.au/~paulh/
  78.   or
  79.     P.O. Box 875
  80.     Morley,
  81.     Perth,
  82.     Western Australia 6943
  83.  
  84. jpeg.library/--future--                               jpeg.library/--future--
  85.  
  86.  Support the writing and reading of JFIF APP0 markers, which stores jpeg
  87.  codec version numbers and horizontal and vertical pixel densities.
  88.  
  89.  Support the writing and reading of Adobe markers.
  90.  
  91. jpeg.library/--history--                             jpeg.library/--history--
  92.  
  93.  V5.1
  94.   > Removed the following versions from the distribution because of
  95.     execution problems with external libraries - 020ffp, 040ffp. Replaced
  96.     the 020ffp version with an 020881 version.
  97.     Thanks to Stephan Rupprecht for informing me of this problem.
  98.  
  99.  V5.0
  100.   > Fixed 3 #define errors in the old AllocRGB functions in jpeg.h.
  101.  
  102.   > The jpeg code is now based on jpegsrc.v6b.tar.gz obtained from the
  103.     Independent JPEG Groups web site "http://www.ijg.org/".
  104.  
  105.   > Added JPEG_BlockSmoothing to allow switching cross block smoothing
  106.     during image decoding on and off (defaults to on).
  107.  
  108.   > Added JPEG_Progressive to enable jpeg streams to be created in
  109.     progressive mode (defaults to off).
  110.  
  111.   > The example source code save_file.c now has a progressive tag for
  112.     testing progressive saving (currently set to FALSE, enable to test).
  113.  
  114.   > Updated the documentation.
  115.  
  116.  V4.2
  117.   > Corrected some small documentation typos in jpeg.h.
  118.  
  119.   > Fixed a bug where if the source jpeg stream was in CMYK format, the
  120.     wrong colourspace format was returned from GetJPEGInfo().
  121.  
  122.   > Renamed AllocRGBBufferFromJPEG() to AllocBufferFromJPEG() and
  123.     FreeJPEGRGBBuffer() to FreeJPEGBuffer(). Old code will continue to
  124.     work because of some defines in jpeg.h.
  125.  
  126.  V4.0
  127.   > Corrected some small typos in the documentation.
  128.  
  129.   > Added DCTMethods for de/compression. These can offset speed versus
  130.     quality. Check jpeg.h for the methods and tag to use.
  131.  
  132.  V3.2
  133.   > Fixed a bug where when decompressing using a render hook, the userdata
  134.     was not passed to the hook.
  135.  
  136.   > Added a new pragmas file which contains pragmas for different
  137.     compilers, thanks to Stephan Rupprecht for his help.
  138.  
  139.  V3.1
  140.   > Fixed a bug where when decompressing to memory using memory pools
  141.     resulted in a 4k memory loss until the freeing of the memory pool.
  142.  
  143.  V3.0
  144.   > Fixed a bug where aborting de/compression returned DE/COMPFAILURE not
  145.     DE/COMPABORTED.
  146.  
  147.   > Some documentation errors and omissions are now fixed.
  148.  
  149.   > Added a render callback hook for use during image decompression.
  150.  
  151.   > Added memory pool support for image compression into a memory
  152.     destination stream.
  153.  
  154.  V2.1
  155.   > Fixed a bug when there is insufficient memory and the library
  156.     attempted to use temporary files (previously would fail to load the
  157.     image). Now it will ask for a JPEGTMP: assignment to store the
  158.     temporary files into.
  159.  
  160.   > Previously the maximum memory to use was fixed at 1 meg. Now it is
  161.     10% less than the total amount of free memory. If there is still
  162.     insufficient memory, temporary files will be used.
  163.  
  164.   > Implemented progress indicator callback hooks for compression and
  165.     decompression.
  166.  
  167.   > Added some additional error codes such as not a jpeg file etc (see
  168.     jpeg.h)
  169.  
  170.   > Updated the example code to show new features of the library. Fixed
  171.     some documentation problems in the example code.
  172.  
  173.  V1.0
  174.   > Initial release.
  175.  
  176. jpeg.library/--information--                     jpeg.library/--information--
  177.  
  178.  Although the documentation is not extensive, the examples are fairly well
  179.  layed out and easy to follow. They all use different methods of
  180.  accessing jpeg.library. You can choose the one that suits your
  181.  application best.
  182.  
  183.  It is EXTREMELY IMPORTANT to check the colour space of the jpeg image you
  184.  have decoded (or are about to decode). For example, in a JPCS_GRAYSCALE
  185.  only one third the amount of information is returned compared to an rgb
  186.  triplet buffer as the grayscale image data is normally one byte per
  187.  pixel. For JPCS_UNKNOWN, check the number of bytes per pixel to establish
  188.  if the data is grayscale or not. For JPCS_RGB, the image data will be
  189.  returned as an rgb triplet array.
  190.  
  191. jpeg.library/AllocBufferFromJPEGA           jpeg.library/AllocBufferFromJPEGA
  192.  
  193.    NAME
  194.   AllocBufferFromJPEGA -- Allocate a jpeg decompression buffer (V1)
  195.   AllocBufferFromJPEG -- Varargs stub (V1)
  196.  
  197.    SYNOPSIS
  198.  buffer = AllocBufferFromJPEGA( jph, taglist )
  199.                              a0   a1
  200.  
  201.  void *AllocBufferFromJPEGA( struct JPEGDecHandle *jph,
  202.                           struct TagItem *taglist )
  203.  
  204.  buffer = AllocBufferFromJPEG( jph, tag1, ... )
  205.  
  206.  void *AllocBufferFromJPEG( struct JPEGDecHandle *jph, ULONG tag1, ... )
  207.  
  208.    FUNCTION
  209.  Allocates enough memory to hold the decompressed version of the jpeg in
  210.  memory. The colourspace can be obtained from GetJPEGInfo(). This
  211.  function does not allocate an RGB sized buffer, but allocates enough
  212.  memory to hold the decoded image.
  213.  
  214.    INPUTS
  215.  taglist  - pointer to an optional tag list specifying how to modify the
  216.             image data.
  217.  
  218.   Modifiers (used, but not saved in the jpeg handle):
  219.    JPG_ScaleNum      - Return values as though scaled with this value.
  220.    JPG_ScaleDenom    - Return values as though scaled with this value.
  221.  
  222.    RESULT
  223.  buffer - is NULL for any error, or a pointer to the memory allocated.
  224.  
  225.    WARNING
  226.  
  227.    BUGS
  228.  
  229.    NOTES
  230.  If you obtained your image sizes from GetJPEGInfo() and used scale tags,
  231.  you SHOULD also pass those same tag values to this function to allocate
  232.  the buffer, otherwise the buffer allocated will be the original size of
  233.  the image.
  234.  
  235.  Previously this function was named AllocRGBFromJPEGA(). There are defines
  236.  in jpeg.h to allow older code to be compiled. Please refrain from using
  237.  the older names in new code.
  238.  
  239.    SEE ALSO
  240.  FreeJPEGBuffer()
  241.  
  242. jpeg.library/AllocJPEGCompressA               jpeg.library/AllocJPEGCompressA
  243.  
  244.    NAME
  245.   AllocJPEGCompressA -- Allocate a jpeg compression handle (V1)
  246.   AllocJPEGCompress -- Varargs stub (V1)
  247.  
  248.    SYNOPSIS
  249.  err = AllocJPEGCompressA( jph, taglist )
  250.                              a0   a1
  251.  
  252.  err = AllocJPEGCompressA( struct JPEGComHandle **jph,
  253.                              struct TagItem *taglist )
  254.  
  255.  err = AllocJPEGCompress( jph, tag1, ... )
  256.  
  257.  err = AllocJPEGCompress( struct JPEGComHandle **jph, ULONG tag1, ... )
  258.  
  259.    FUNCTION
  260.  Allocates a new jpeg handle.
  261.  
  262.   Available tags:
  263.    JPG_DestMemStream     - A pointer to a UBYTE pointer to take the data
  264.                            generated by the compressor (if specified, must
  265.                            also specify the JPG_DestMemStreamSize tag).
  266.                            See NOTE below about this allocated memory.
  267.    JPG_DestMemStreamSize - A pointer to a ULONG to take the size of the
  268.                            compressed data (if specified, must also
  269.                            specify the JPG_DestMemStream).
  270.    JPG_DestFile          - A BPTR to an already open AmigaDOS file.
  271.  
  272.   New tags requiring V3.0
  273.    JPG_MemoryPool        - A pointer to a exec V39 memory pool to store
  274.                            the compressed jpeg data into. (NOT freed on
  275.                            exit.)
  276.  
  277.    INPUTS
  278.  jph - pointer to a struct JPEGComHandle pointer.
  279.  taglist - pointer to a tag list specifying the destination for the
  280.            compressed data and data size.
  281.  
  282.    RESULT
  283.  err - if non NULL contains an error code. (For a complete list of error
  284.        codes, see jpeg.h)
  285.  
  286.    WARNING
  287.  
  288.    BUGS
  289.  
  290.    NOTES
  291.  You are responsible for freeing the memory allocated to you, by calling
  292.  FreeVec() on the pointer supplied to AllocJPEGCompress() (if it isnt a
  293.  NULL value).
  294.  
  295.  BUT if you are using the new JPG_MemoryPool tag in object allocation,
  296.  call an appropriate pool or puddle free routine.
  297.  
  298.    SEE ALSO
  299.  FreeJPEGCompressA(), CompressJPEGA()
  300.  
  301. jpeg.library/AllocJPEGDecompressA           jpeg.library/AllocJPEGDecompressA
  302.  
  303.    NAME
  304.   AllocJPEGDecompressA -- Allocate a jpeg decompression handle (V1)
  305.   AllocJPEGDecompress -- Varargs stub (V1)
  306.  
  307.    SYNOPSIS
  308.  err = AllocJPEGDecompressA( jph, taglist )
  309.                              a0   a1
  310.  
  311.  err = AllocJPEGDecompressA( struct JPEGDecHandle **jph,
  312.                              struct TagItem *taglist )
  313.  
  314.  err = AllocJPEGDecompress( jph, tag1, ... )
  315.  
  316.  err = AllocJPEGDecompress( struct JPEGDecHandle **jph, ULONG tag1, ... )
  317.  
  318.    FUNCTION
  319.  Allocates a new jpeg handle.
  320.  
  321.   Available tags:
  322.    JPG_SrcMemStream     - The source image is a segment of memory starting
  323.                           at this address.
  324.    JPG_SrcMemStreamSize - The length of the memory based segment, in bytes.
  325.    JPG_SrcFile          - A BPTR to an already open AmigaDOS file.
  326.  
  327.    INPUTS
  328.  jph - pointer to a struct JPEGDecHandle pointer.
  329.  taglist - pointer to a tag list specifying the jpeg stream source and
  330.            size.
  331.  
  332.    RESULT
  333.  err - if non NULL contains an error code. (For a complete list of error
  334.        codes, see jpeg.h)
  335.  
  336.    WARNING
  337.  
  338.    BUGS
  339.  
  340.    SEE ALSO
  341.  FreeJPEGDecompressA(), DecompressJPEGA()
  342.  
  343. jpeg.library/CompressJPEGA                         jpeg.library/CompressJPEGA
  344.  
  345.    NAME
  346.   CompressJPEGA -- Compress a jpeg stream (V1)
  347.   CompressJPEG -- Varargs stub (V1)
  348.  
  349.    SYNOPSIS
  350.  err = CompressJPEGA( jph, taglist )
  351.                         a0   a1
  352.  
  353.  err = CompressJPEGA( struct JPEGComHandle *jph,
  354.                         struct TagItem *taglist )
  355.  
  356.  err = CompressJPEG( jph, tag1, ... )
  357.  
  358.  err = CompressJPEG( struct JPEGComHandle **jph, ULONG tag1, ... )
  359.  
  360.    FUNCTION
  361.  Compresses a jpeg stream into the location specified by
  362.  AllocJPGCompress() using the supplied tags.
  363.  
  364.   Available tags:
  365.    JPG_SrcRGBBuffer      - An RGB triplet buffer containing the source
  366.                            image.
  367.    JPG_CompressHook      - Calls a user specified function (see jpeg.h)
  368.    JPG_CompressUserData  - User data passed to the hook function.
  369.    JPG_Width             - Width of the image (REQUIRED).
  370.    JPG_Height            - Height of the image (REQUIRED).
  371.    JPG_Quality           - Jpeg save quality (1-100), defaults to 85.
  372.    JPG_BytesPerPixel     - The number of bytes per image pixel, defaults
  373.                            to 3.
  374.    JPG_ColourSpace       - The type of image data stored in the buffer,
  375.                            defaults to JPCS_RGB (see jpeg.h for others).
  376.    JPG_Smoothing         - Apply image smoothing while saving (0-100),
  377.                            defaults to none (0).
  378.  
  379.   New tags requiring V2.1
  380.    JPG_ProgressHook      - Calls a user specified function (see jpeg.h).
  381.                             DO NOT pass a hook structure pointer here. Put
  382.                             a pointer to your function. (See examples).
  383.                             Returning a non NULL value from the hook will
  384.                             abort a load in progress.
  385.    JPG_ProgressUserData  - User data passed to the hook function (void *).
  386.  
  387.   New tags requiring V4.0
  388.    JPG_DCTMethod         - The DCT processing method to use for encoding,
  389.                            defaults to DCT_ISLOW (see jpeg.h for others).
  390.  
  391.   New tags requiring V5.0
  392.    JPG_Progressive       - If TRUE, the jpeg stream will be created in
  393.                            progressive mode, defaults to FALSE.
  394.  
  395.    INPUTS
  396.  jph - pointer to a struct JPEGComHandle.
  397.  taglist - pointer to a tag list.
  398.  
  399.    RESULT
  400.  err - if non NULL contains an error code. (For a complete list of error
  401.        codes, see jpeg.h)
  402.  
  403.    WARNING
  404.  
  405.    BUGS
  406.  
  407.    NOTES
  408.  You are responsible for freeing the memory allocated to you, by calling
  409.  FreeVec() on the pointer supplied to AllocJPEGCompress().
  410.  
  411.  BUT if you are using the new JPG_MemoryPool tag in object allocation,
  412.  call an appropriate pool or puddle free routine.
  413.  
  414.  e.g.
  415.  
  416.   UBYTE *cstream;
  417.   ULONG cstreamsize;
  418.  
  419.   err = AllocJPEGCompress( &jpc, JPG_DestMemStream, &cstream,
  420.           JPG_DestMemStreamSize, &cstreamsize, TAG_DONE );
  421.  
  422.   err = CompressJPEG( jpc, JPG_SrcRGBBuffer, buffer,
  423.           JPG_Width, x, JPG_Height, y, TAG_DONE );
  424.  
  425.   FreeJPEGCompress( jpc );
  426.  
  427.   /* Use the buffer here */
  428.  
  429.   if ( cstream != NULL ) FreeVec( cstream );
  430.  
  431.    SEE ALSO
  432.  AllocJPEGCompressA(), FreeJPEGCompressA()
  433.  
  434. jpeg.library/DecompressJPEGA                     jpeg.library/DecompressJPEGA
  435.  
  436.    NAME
  437.   DecompressJPEGA -- Decompress a jpeg stream (V1)
  438.   DecompressJPEG -- Varargs stub (V1)
  439.  
  440.    SYNOPSIS
  441.  err = DecompressJPEGA( jph, taglist )
  442.                         a0   a1
  443.  
  444.  err = DecompressJPEGA( struct JPEGDecHandle *jph,
  445.                         struct TagItem *taglist )
  446.  
  447.  err = DecompressJPEG( jph, tag1, ... )
  448.  
  449.  err = DecompressJPEG( struct JPEGDecHandle **jph, ULONG tag1, ... )
  450.  
  451.    FUNCTION
  452.  Decompresses a jpeg stream as specified by AllocJPGDecompress() and
  453.  supplied tags.
  454.  
  455.   Available tags:
  456.    JPG_DestRGBBuffer      - The decompressed image data is stored as RGB
  457.                             triplets starting at this address. You must
  458.                             allocate enough memory to take the image. Use
  459.                             AllocRGBFromJPEG() to allocate the required
  460.                             memory space.
  461.    JPG_DecompressHook     - Calls a user specified function (see jpeg.h).
  462.                             DO NOT pass a hook structure pointer here. Put
  463.                             a pointer to your function. (See examples)
  464.    JPG_DecompressUserData - User data passed to the hook function (void *).
  465.    JPG_ScaleNum           - Scale decompressed data with this value.
  466.    JPG_ScaleDenom         - Scale decompressed data with this value.
  467.  
  468.   New tags requiring V2.1
  469.    JPG_ProgressHook       - Calls a user specified function (see jpeg.h).
  470.                             DO NOT pass a hook structure pointer here. Put
  471.                             a pointer to your function. (See examples).
  472.                             Returning a non NULL value from the hook will
  473.                             abort a load in progress.
  474.    JPG_ProgressUserData   - User data passed to the hook function (void *).
  475.  
  476.   New tags requiring V3.0
  477.    JPG_RenderHook         - Calls a user specified function (see jpeg.h).
  478.                             DO NOT pass a hook structure pointer here. Put
  479.                             a pointer to your function. (See examples).
  480.                             Returning a non NULL value from the hook will
  481.                             abort a load in progress.
  482.    JPG_RenderUserData     - User data passed to the hook function (void *).
  483.  
  484.   New tags requiring V4.0
  485.    JPG_DCTMethod         - The DCT processing method to use for decoding,
  486.                            defaults to DCT_ISLOW (see jpeg.h for others).
  487.  
  488.   New tags requiring V5.0
  489.    JPG_BlockSmoothing    - If TRUE, apply cross block smoothing during
  490.                            image decoding, defaults to TRUE.
  491.  
  492.    INPUTS
  493.  jph - pointer to a struct JPEGDecHandle.
  494.  taglist - pointer to a tag list.
  495.  
  496.    RESULT
  497.  err - if non NULL contains an error code. (For a complete list of error
  498.        codes, see jpeg.h)
  499.  
  500.    WARNING
  501.  The jpeg code has a limition on scaling where, num must always be 1 and
  502.  denom can be either: 1, 2, 4, or 8. Undefined results occur if this is
  503.  not adhered to.
  504.  
  505.    BUGS
  506.  
  507.    SEE ALSO
  508.  AllocJPEGDecompressA(), FreeJPEGDecompressA()
  509.  
  510. jpeg.library/FreeJPEGBuffer                       jpeg.library/FreeJPEGBuffer
  511.  
  512.    NAME
  513.   FreeJPEGBuffer -- Free a jpeg decompression buffer (V1)
  514.  
  515.    SYNOPSIS
  516.  FreeJPEGBuffer( buffer )
  517.                     a0
  518.  
  519.  void FreeJPEGBuffer( void *buffer )
  520.  
  521.    FUNCTION
  522.  Frees a buffer allocated with AllocBufferFromJPEGA().
  523.  
  524.    INPUTS
  525.  buffer - Pointer to the allocated buffer returned by
  526.           AllocBufferFromJPEG().
  527.  
  528.    RESULT
  529.  
  530.    WARNING
  531.  
  532.    BUGS
  533.  
  534.    NOTES
  535.  Previously this function was named AllocRGBFromJPEGA(). There are defines
  536.  in jpeg.h to allow older code to be compiled. Please refrain from using
  537.  the older names in new code.
  538.  
  539.    SEE ALSO
  540.  AllocBufferFromJPEG()
  541.  
  542. jpeg.library/FreeJPEGCompress                   jpeg.library/FreeJPEGCompress
  543.  
  544.    NAME
  545.   FreeJPEGCompress -- Free a jpeg compression handle (V1)
  546.  
  547.    SYNOPSIS
  548.  err = FreeJPEGCompress( jph )
  549.                             a0
  550.  
  551.  err = FreeJPEGCompress( struct JPEGComHandle *jph )
  552.  
  553.    FUNCTION
  554.  Frees a jpeg handle.
  555.  
  556.    INPUTS
  557.  jph - pointer to a struct JPEGComHandle.
  558.  
  559.    RESULT
  560.  err - if non NULL contains an error code. (For a complete list of error
  561.        codes, see jpeg.h)
  562.  
  563.    WARNING
  564.  
  565.    BUGS
  566.  
  567.    NOTES
  568.  You are responsible for freeing the memory allocated to you by
  569.  CompressJPEG(), by calling FreeVec() on the pointer supplied to
  570.  AllocJPEGCompress().
  571.  
  572.  BUT if you are using the new JPG_MemoryPool tag in object allocation,
  573.  call an appropriate pool or puddle free routine.
  574.  
  575.    SEE ALSO
  576.  AllocJPEGCompressA(), CompressJPEGA()
  577.  
  578. jpeg.library/FreeJPEGDecompress               jpeg.library/FreeJPEGDecompress
  579.  
  580.    NAME
  581.   FreeJPEGDecompress -- Free a jpeg decompression handle (V1)
  582.  
  583.    SYNOPSIS
  584.  err = FreeJPEGDecompress( jph )
  585.                             a0
  586.  
  587.  err = FreeJPEGDecompress( struct JPEGDecHandle *jph )
  588.  
  589.    FUNCTION
  590.  Frees a jpeg handle.
  591.  
  592.    INPUTS
  593.  jph - pointer to a struct JPEGDecHandle.
  594.  
  595.    RESULT
  596.  err - if non NULL contains an error code. (For a complete list of error
  597.        codes, see jpeg.h)
  598.  
  599.    WARNING
  600.  
  601.    BUGS
  602.  
  603.    SEE ALSO
  604.  AllocJPEGDecompressA(), DecompressJPEGA()
  605.  
  606. jpeg.library/GetJPEGInfoA                           jpeg.library/GetJPEGInfoA
  607.  
  608.    NAME
  609.   GetJPEGInfoA -- Get information about a jpeg handle (V1)
  610.   GetJPEGInfo -- Varargs stub (V1)
  611.  
  612.    SYNOPSIS
  613.  err = GetJPEGInfoA( jph, taglist )
  614.                      a0   a1
  615.  
  616.  err = GetJPEGInfoA( struct JPEGDecHandle *jph, struct TagItem *taglist )
  617.  
  618.  err = GetJPEGInfo( jph, tag1, ... )
  619.  
  620.  err = GetJPEGInfo( struct JPEGDecHandle *jph, ULONG tag1, ... )
  621.  
  622.    FUNCTION
  623.  Retrieves information about the jpeg handle and returns the values in
  624.  variables passed in with the taglist.
  625.  
  626.   Available tags:
  627.    JPG_Width         - Returns the width of the decoded image (ULONG).
  628.    JPG_Height        - Returns the height of the decoded image (ULONG).
  629.    JPG_BytesPerPixel - Returns the number of bytes for every pixel,
  630.                        (usually 3 - JPCS_RGB) (ULONG).
  631.    JPG_RowSize       - Returns the width in bytes of one pixel row (ULONG).
  632.    JPG_ColourSpace   - Returns the type of colour space stored in the jpeg
  633.                        image (see jpeg.h for result codes) (UBYTE)
  634.  
  635.   Modifiers (used, but not saved in the jpeg handle):
  636.    JPG_ScaleNum      - Return values as though scaled with this value.
  637.    JPG_ScaleDenom    - Return values as though scaled with this value.
  638.  
  639.  The jpeg code has a limition on scaling where, num must always be 1 and
  640.  denom can be either: 1, 2, 4, or 8.
  641.  
  642.  Only JPEGDecHandles can have values read from them, JPEGComHandle passed
  643.  to this function returns a JPGERR_NONE and the taglist remains untouched.
  644.  
  645.    INPUTS
  646.  jph - pointer to a struct JPEGDecHandle.
  647.  taglist - pointer to an optional tag list specifying what data items to
  648.             retrieve for this jpeg handle.
  649.  
  650.    RESULT
  651.  err - if non NULL contains an error code. (For a complete list of error
  652.        codes, see jpeg.h)
  653.  
  654.    WARNING
  655.  
  656.    BUGS
  657.  
  658.    EXAMPLE
  659.  
  660.  err = GetJPEGInfo( jph, JPG_Width, &x, JPG_Height, &y, TAG_DONE );
  661.  
  662.    SEE ALSO
  663.  
  664.  
  665.